/*
 * AS3 MultiTouch Client
 *
 * Touchable - Wraps an object that has been made touchable by the TouchManager.  
 *
 * Copyright 2008 Artifacts - Fine Software Development
 * http://www.artifacts.de
 * Author: Michael Markowski (m.markowski@artifacts.de)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
 /**
 * Touchable - Wraps an object that has been made touchable by the TouchManager.
 * A wrapper class holding the actual DisplayObject as well as the assigned behaviours to this
 * object and a reference to the TouchManager.
 */
package de.artifacts.multitouch
{
	import flash.display.DisplayObject;
	import flash.geom.Point;
	
	import net.contentismissing.tlabs.cocktailparty.ui.Bubble;
	
	public class Touchable
	{
		public var behaviours : Array;
		public var wrappee : DisplayObject;
		public var touchManager : TouchManager;
		public var zIndex : int;
		public var lastTouchTime : int;
		public static const SINGLE_TAP_DURATION_MIN : int = 60;
		public static const SINGLE_TAP_DURATION_MAX : int = 500;
		
		public static const DOUBLE_TAP_INTERVAL_MIN : int = 60;
		public static const DOUBLE_TAP_INTERVAL_MAX : int = 500;
		public var positionOnFirstTouch : Point;
		public var offsetX : Number = 0;
		public var offsetY : Number = 0;
		public var doubleTap : Boolean;
		public var touchingCursors : Array;
		// isNonExclusive means, that other touchables on the same position can be touched together with this one
		public var isNonExclusive : Boolean = false;
		
		public function Touchable(wrappee : DisplayObject, touchManager : TouchManager, zIndex : int, nonExclusive : Boolean)
		{
			this.wrappee = wrappee;
			this.behaviours = new Array();			
			this.touchManager = touchManager;
			this.touchingCursors = new Array();			
			this.zIndex = zIndex;
			this.isNonExclusive = nonExclusive;
		}
	
	}
}